<%--
  Created by IntelliJ IDEA.
  User: 17728
  Date: 2020/10/12
  Time: 15:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <%@ include file="/pages/common/head.jsp" %>
    <script type="text/javascript">
        $(function () {
            // 给 【删除】绑定单击事件
            $("a.deleteItem").click(function () {
                return confirm("你确定要删除 【" + $(this).parent().parent().find("td:first").text() + "】吗?")
            });
        });
    </script>
    <style type="text/css">
        .a {
            width: 60vw;
            height: 550px;
            margin: 0 auto;
            position: relative;
            top: 50px;
        }

        .b {

            height: 480px;
        }

        .d {
            text-align: center;
            position: relative;
            bottom: 0px;

        }

    </style>
</head>
<body>
<div class="a">
    <div class="b">
        <table align="center" class="table table-hover">
            <thead>
            <td colspan="9" align="center"><h3><a href="pages/admin/student/admin_student_edit.jsp">添加学生信息</a></h3></td>

            <tr align="center">
                <td>id</td>
                <td>uid</td>
                <td>sNo</td>
                <td>sname</td>
                <td>age</td>
                <td>email</td>
                <td>qq</td>
                <td>classId</td>
                <td>修改</td>
                <td>删除</td>
            </tr>
            </thead>

            <c:forEach items="${requestScope.students}" var="students">
                <tr align="center">
                    <td>${students.id}</td>
                    <td>${students.uId}</td>
                    <td>${students.sNo}</td>
                    <td>${students.sname}</td>
                    <td>${students.age}</td>
                    <td>${students.email}</td>
                    <td>${students.qq}</td>
                    <td>${students.class_id}</td>
                    <td><a href="StudentServlet?action=queryStudentById&id=${students.id}">修改</a></td>
                    <td><a class="deleteItem" href="StudentServlet?action=deleteStudent&id=${students.id}">删除</a></td>
                </tr>
            </c:forEach>

        </table>
    </div>

</div>

</body>
</html>
